#ifndef __WithZigBee_h__
#define __WithZigBee_h__


typedef union   
{
	struct
	{
		unsigned bRx:1;
		unsigned bReadParam:1;
	};
	unsigned char AllFlag;
} _WithZigBee_Flags;        // general flags


//#define WithZigBee_TxByteWithVerify(x) Uart1_VerifySumAddTxByte(x)
#define WithZigBee_TxByte(x) Uart1_PutChar(x)



#define pWithZigBeeData 6
#define pWithZigBee_CommandIndex 5


#define MAX_WithZigBee_RX 100

_WithZigBee_Flags WithZigBee_Flags;
unsigned char WithZigBee_RxList[MAX_WithZigBee_RX+10];
unsigned char WithZigBee_RxCount;
unsigned char WithZigBee_NeedRx;
unsigned int WithZigBee_NoRxTick;
uint ZigBeeID;

void WithZigBee_Init(void);
void WithZigBee_EndProcCommand(void);
void WithZigBee_ProcRx(unsigned char rx);
void WithZigBee_SendData(unsigned char addr,unsigned char value);
void WithZigBee_CommandProc(void);
void WithZigBee_RST(void);
#endif


